home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 September / Chip_2000-09_cd1.bin / sharewar / Slunec / app / 16 / ARCHIVES.SWG / 0019_JAR Archive.pas < prev    next >
Pascal/Delphi Source File  |  1997-05-11  |  5KB  |  203 lines

  1.  
  2.     JAR TECHNICAL INFORMATION                               October 1996
  3.  
  4.  
  5.     JAR archive identification scheme:
  6.  
  7.     A file is considered a JAR archive if it contains a predefined 64-byte
  8.     structure.
  9.  
  10.     Structure description:
  11.  
  12.        at byte offset 0 for 4 bytes:
  13.  
  14.           Whole structure CRC32 XOR-ed with 0xffffffff and shifted
  15.           cyclically 11 bits to the right (to the lowest bit). When
  16.           counting CRC32 this field itself is assumed to be 0.
  17.  
  18.        at byte offset 14 for 6 bytes:
  19.  
  20.           signature: 0x1A 'J' 'a' 'r' 0x1B 0x00
  21.  
  22.       other structure fields not defined.
  23.  
  24.     This structure does NOT necessarily start at the head of the file.
  25.  
  26.     For normal archives this structure resides at the head of the file.
  27.     However to support future JAR SFX-es you must search the first 128
  28.     kilobytes of the file for this structure (optional check for executable
  29.     'MZ' may also be done).
  30.  
  31.  
  32.     The remaining part of this document contains a description of the JAR
  33.     archive header information that is dumped to a text file using the "lt"
  34.     command.
  35.  
  36.     The dump file should be treated as a text file. Each line has the same
  37.     syntax:
  38.  
  39.     <Keyword>=<value>
  40.  
  41.     These lines are assembled into a tree.  Subnodes are shifted with respect
  42.     to the parent node by using two ' ' (space) characters.  Example:
  43.  
  44.     Chapter=1
  45.       Created=1996-09-01 17:55:05.9800000
  46.       Modified=1996-09-01 17:55:05.9800000
  47.       Comment="Some\r\ncomment"
  48.       Flags=0
  49.     File=FIRST.BAT
  50.       Created=1996-09-01 17:20:41.4400000
  51.       Modified=1996-09-01 16:37:00.0000000
  52.       LastAccess=1996-09-01 00:00:00.0000000
  53.       Size=2160
  54.       ChaptersRange=1-2
  55.       Attributes=1
  56.     File=SECOND.BAT
  57.       Created=1996-09-01 17:20:41.4400000
  58.       Modified=1996-09-01 16:37:00.0000000
  59.       LastAccess=1996-09-01 00:00:00.0000000
  60.       Size=2160
  61.       ChaptersRange=1-2
  62.       Attributes=1
  63.  
  64.     Currently, the tree depth is two (only nodes and one-level subnodes) but
  65.     in future JAR versions, the depth may be increased.
  66.  
  67.     You should not rely on the order in which keywords are listed.  For
  68.     compatibility with future versions all unknown keywords must be
  69.     skipped.  Binary keyword values (such as ANSI comments) are quoted and
  70.     encoded using escape character '\'.
  71.  
  72.     This is a brief description of the currently used keywords:
  73.  
  74.  
  75.     Archive=
  76.  
  77.           Archive keyword. Subnodes describe global archive related
  78.           information.
  79.  
  80.       Created=1996-09-01 17:21:31.9100000
  81.  
  82.           Archive creation time YYYY-MM-DD HH:MM:SS.SSSSSSS
  83.  
  84.       Modified=1996-09-01 19:17:56.5100000
  85.  
  86.           Last time archive has been modified.
  87.  
  88.       VersionUsed=0101
  89.  
  90.           JAR version used to update archive (1.01 in this example).
  91.  
  92.       VersionToUpdate=0050
  93.  
  94.           JAR version required to update archive (0.50 in this example).
  95.  
  96.       VersionToExtract=0050
  97.  
  98.           JAR version required to extract files from archive.
  99.  
  100.       VersionToList=0050
  101.  
  102.           JAR version required to list files in archive.
  103.  
  104.       Flags=0
  105.  
  106.           Currently, JAR archive flags is the sum of the following
  107.           constants:
  108.  
  109.             1   LOCKED
  110.             2   AUTO_LOCK
  111.             4   RECOVERY RECORDS
  112.             8   SECURED
  113.            16   HIDDEN
  114.            32   ENCRYPTED/PROTECTED
  115.  
  116.  
  117.       Comment="Some\r\ncomment"
  118.  
  119.           Optional archive comment. Escape characters:
  120.  
  121.           \\     Backslash
  122.           \"     Double quotation mark
  123.           \b     Backspace
  124.           \n     Newline
  125.           \r     Carriage return
  126.           \t     Tab
  127.           \ddd   ASCII character in octal notation. 3 digits always used.
  128.  
  129.       MaxChapter=3
  130.  
  131.           Maximum chapter in archive.
  132.  
  133.  
  134.     Chapter=1
  135.  
  136.           Chapter (#1 in this example). Subnodes supply information about
  137.           chapter.
  138.  
  139.       Created=1996-09-01 17:21:31.9100000
  140.  
  141.           Creation time
  142.  
  143.       Modified=1996-09-01 17:21:31.9100000
  144.  
  145.           Modification time
  146.  
  147.       Flags=0
  148.  
  149.           Chapter flags is sum of following constants:
  150.  
  151.             1   LOCKED
  152.  
  153.       Comment="Some\r\ncomment"
  154.  
  155.           Optional chapter comment. Same format as in case of archive.
  156.  
  157.  
  158.     File=TESTJAR.BAT
  159.  
  160.           Filename. Subnodes contain information about file.
  161.  
  162.       Created=1996-09-01 17:20:41.4400000
  163.  
  164.           File creation time
  165.  
  166.       Modified=1996-09-01 16:37:00.0000000
  167.  
  168.           File modification time
  169.  
  170.       LastAccess=1996-09-01 00:00:00.0000000
  171.  
  172.           File last accessed time
  173.  
  174.       Size=2160
  175.  
  176.           File size in bytes
  177.  
  178.       ChaptersRange=1-2
  179.  
  180.           Chapter range to which file belongs
  181.  
  182.       Attributes=1
  183.  
  184.           Sum of:
  185.  
  186.             1   ARCHIVE
  187.             2   HIDDEN
  188.             4   SYSTEM
  189.             8   READONLY
  190.             16  DIRECTORY
  191.  
  192.       Comment="Some\r\ncomment"
  193.  
  194.           Optional file comment.
  195.  
  196.  
  197.     Actually, the JAR header contains more information than is currently
  198.     listed using the "lt" command.  In the future we will add additional
  199.     keywords.
  200.  
  201.  
  202.     end of document
  203.